home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_riv_amblanding.cog < prev    next >
Text File  |  1999-11-15  |  2KB  |  101 lines

  1. # Jones 3D Cog Script
  2. #
  3. # RIV_AmbLanding.cog
  4. #
  5. # Plays random ambient sounds at random positions and drops
  6. # snow at all the positions all the time.
  7. #
  8. # [TRM]
  9. #
  10. # (C) 1999 LucasArts Entertainment Co. All Rights Reserved
  11. # ========================================================================================
  12.  
  13. symbols
  14.  
  15.     message     startup
  16.     message        entered
  17.     message     pulse
  18.  
  19.     thing        soundPos0        nolink
  20.     thing        soundPos1        nolink
  21.     thing        soundPos2        nolink
  22.     thing        soundPos3        nolink
  23.     thing        soundPos4        nolink
  24.     
  25.     sector      start_Amb1      linkID=1
  26.     
  27.     sector      stop_Amb1       linkID=0
  28.  
  29.     sound        ambient0=shw_amb1.wav   local
  30.     sound        ambient1=shw_amb2.wav   local
  31.     sound        ambient2=shw_amb3.wav   local
  32.     sound        ambient3=shw_amb4.wav   local
  33.     sound        ambient4=shw_amb5.wav   local
  34.     sound        ambient5=shw_amb6.wav   local
  35.     sound        ambient6=shw_amb7.wav   local
  36.     
  37.     template    tpl_Snow=skitosnow      local
  38.     
  39.     int         playing=0               local
  40.     
  41.     int         randNum                 local
  42.     sound       snd_Wolf=fol_wolf_talk.wav      local
  43.     
  44. end
  45.  
  46. # ========================================================================================
  47.  
  48. code
  49.  
  50. startup:
  51.  
  52.     playing = 1;
  53.     SetPulse(2.0);
  54.     return;
  55.  
  56. # ========================================================================================
  57.  
  58. entered:
  59.  
  60.     if((GetSenderID() == 1) && (playing == 0))
  61.     {
  62.         playing = 1;
  63.         setpulse(2.0);
  64.     }
  65.     
  66.     if(GetSenderID() == 0)
  67.     {
  68.         playing = 0;
  69.         SetPulse(0.0);
  70.     }
  71.     
  72.     return;
  73.  
  74. # ========================================================================================
  75.  
  76. pulse:
  77.  
  78.     PlaySoundThing(ambient0[RandBetween(0, 6)], soundPos0[RandBetween(0, 4)], 1.0, 15, 30, 0);
  79.     
  80.     randNum = RandBetween(1, 10);
  81.     
  82.     if(randNum == 5)
  83.     {
  84.         PlaySoundThing(snd_Wolf, soundPos0[RandBetween(0, 7)], 0.5, 15, 30, 0);
  85.     }
  86.     
  87.     if(GetPerformanceLevel() >= 2)
  88.     {
  89.         CreateThing(tpl_Snow, soundPos0);        
  90.         CreateThing(tpl_Snow, soundPos1);        
  91.         CreateThing(tpl_Snow, soundPos2);        
  92.         CreateThing(tpl_Snow, soundPos3);        
  93.         CreateThing(tpl_Snow, soundPos4);
  94.     }
  95.     
  96.     return;
  97.  
  98. # ========================================================================================
  99.  
  100. end
  101.